package com.fieldchain.ex.fa100.mvp.presenter;

import android.graphics.Bitmap;
import com.fieldchain.ex.fa100.inter.ImageCallBack;
import com.fieldchain.ex.fa100.inter.IntegerCallBack;
import com.fieldchain.ex.fa100.mvp.base.MyBasePresenter;
import com.fieldchain.ex.fa100.mvp.model.RegistModle;
import com.fieldchain.ex.fa100.mvp.view.RegistView;

/**
 * Created by biyunlong
 * Email: 1225198434@qq.com
 * Data:  2018/9/3
 */
public class RegistPresenter extends MyBasePresenter<RegistModle,RegistView> {
     public void regist(String userName,String msgcode){
         model.regist(userName, msgcode, new IntegerCallBack() {
             @Override
             public void index(int status) {
                 view.registResult(status);
             }
         });
     }

    public void regist(String userName,String msgcode,String pwd,String invite){
        model.regist(userName, msgcode, pwd,invite,new IntegerCallBack() {
            @Override
            public void index(int status) {
                view.registResult(status);
            }
        });
    }

     public void getVer(){
         model.getVer(new ImageCallBack() {
             @Override
             public void imageReceive(Bitmap bit) {
                 view.verImage(bit);
             }
         });
     }
}
